#define _CRT_SECURE_NO_WARNINGS 1

#include"shared_ptr.h"



class Fclose
{
public:
	void operator()(FILE* ptr)
	{
		cout << "fclose:" << ptr << endl;
		fclose(ptr);
	}
};

int main()
{
	
	bit::shared_ptr<FILE> sp1(fopen("test.cpp", "r"), Fclose());
	bit::shared_ptr<FILE> sp2(sp1);
	return 0;
}